<%@page import="org.apache.spark.SparkFiles"%>
<%@page import="org.apache.spark.sql.functions"%>
<%@page import="org.apache.spark.api.java.function.Function"%>
<%@page import="org.apache.spark.api.java.JavaSparkContext"%>
<%@page import="org.apache.spark.api.java.JavaRDD"%>
<%@page import="org.apache.spark.rdd.RDD"%>
<%@page import="com.test.redis.RedisCli"%>
<%@page import="org.apache.spark.sql.SQLContext"%>
<%@page import="com.test.spark.SparkContextServer"%>
<%@page import="org.apache.spark.SparkContext"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
	JavaSparkContext sc = SparkContextServer.sc;
	out.println(sc.appName()+"<br>");
	if(true)return;
	String path = getClass().getClassLoader().getResource("input.data").getPath();
	sc.addFile(path);
	JavaRDD<String> rdd = sc.textFile(SparkFiles.get("input.data"),1).cache();
	out.print(rdd.count());
	//Long lines = rdd.map(new Function<String,String>(){
	//	public String call(String s) throws Exception{
	//		return s;
	//	}
	//}).count();
	//out.print(lines);
	//out.print(rdd.first());
	out.print(RedisCli.object2String(sc.jars()));
	
%>
</body>
</html>